import 'package:enter_prise_web/util/MyDio.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:get/get.dart';

class moreController extends GetxController {
  final MyDio myDio = MyDio();
  List noticelist = [];

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    getAllNotice();
  }

  void getAllNotice() async {
    var response = await myDio.requestData("/notice/getAll",method: 'GET');
    if (response.statusCode == 200) {
      noticelist = response.data;
      update(['notice_list']);
    } else {
      Fluttertoast.showToast(webPosition: "center", msg: "获取通知失败");
    }
  }
}
